﻿<Window x:Class="Clancy.Ui.Views.ZoneEditorWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
        DataContext="{Binding ZoneEditorViewModel, Source={StaticResource Locator}}"
        Title="Zone Editor" Height="512" Width="640" ShowInTaskbar="False" Icon="/Clancy.Ui;component/Resources/camera.ico" WindowStartupLocation="CenterOwner">
    <Grid>
        <DockPanel LastChildFill="True">
            <ToolBarTray DockPanel.Dock="Top">
                <ToolBar>
                    <Button Command="{Binding CmdClearAll}">
                        <StackPanel Orientation="Horizontal">
                            <Image Height="32" Width="32" Source="../Resources/edit-clear-2.png" />
                            <Label Content="Clear" VerticalAlignment="Center" />
                        </StackPanel>
                    </Button>
                    <Button Command="{Binding CmdSave}">
                        <StackPanel Orientation="Horizontal">
                            <Image Height="32" Width="32" Source="../Resources/dialog-ok-apply-6.png" />
                            <Label Content="Save" VerticalAlignment="Center" />
                        </StackPanel>
                    </Button>
                    <Label VerticalAlignment="Center">Zonesize</Label>
                    <xctk:IntegerUpDown Value="{Binding BoxSize}" VerticalAlignment="Center" Minimum="2" Maximum="999" />
                    <Button Command="{Binding CmdDeleteZone}">
                        <StackPanel Orientation="Horizontal">
                            <Image Height="32" Width="32" Source="../Resources/edit-delete-9_32.png" />
                            <Label Content="Delete zone" VerticalAlignment="Center" />
                        </StackPanel>
                    </Button>
                </ToolBar>
            </ToolBarTray>

            <Canvas x:Name="FullCanvas" MouseLeftButtonDown="OnDrawingCanvasMouseLeftButtonDown" Background="Black">
                <Image x:Name="VideoCanvas" Source="{Binding CurrentFrame}" />
                <!--<Image x:Name="VideoCanvas" Source="/Clancy.Ui;component/Resources/edit-delete-9_32.png" />-->
                <Canvas x:Name="DrawingCanvasZones" />
                <Canvas x:Name="DrawingCanvasPolygon" />
            </Canvas>
        </DockPanel>
    </Grid>
</Window>